CREATE TABLE [dbo].[language] (
	[ID] [numeric](10, 0) NOT NULL CONSTRAINT LANGUAGE_PK PRIMARY KEY,
	[lang] [char] (2) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL 
) ON [PRIMARY]
GO

CREATE TABLE [dbo].[address] (
	[ID] [numeric](10, 0) NOT NULL CONSTRAINT ADDRESS_PK PRIMARY KEY,
	[UUID] [varchar] (20) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL DEFAULT '_NA_' CONSTRAINT ADDRESS_CS1 UNIQUE
) ON [PRIMARY]
GO

CREATE TABLE [dbo].[addressdetail] (
	[Language_ID] [numeric](10, 0) NOT NULL CONSTRAINT ADDRESSDETAIL_FK1 FOREIGN KEY REFERENCES [dbo].[language] (id) ON DELETE CASCADE,
	[Address_ID] [numeric](10, 0) NOT NULL CONSTRAINT ADDRESSDETAIL_FK2 FOREIGN KEY REFERENCES [dbo].[address] (id) ON DELETE CASCADE ,
	[FullAddress] [varchar] (128) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL ,
	[Street] [char] (40) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL ,
	[Ward] [char] (40) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL ,
	[District] [char] (40) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL ,
	[City] [char] (20) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
	CONSTRAINT ADDRESSDETAIL_CST1 UNIQUE NONCLUSTERED (Language_ID, ADDRESS_ID)
) ON [PRIMARY]

GO

CREATE TABLE [dbo].[bgroup] (
	[ID] [numeric](10, 0) NOT NULL CONSTRAINT BGROUP_PK PRIMARY KEY ,
	[UUID] [varchar] (20) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL DEFAULT '_NA_' CONSTRAINT BGROUP_CS1 UNIQUE 
) ON [PRIMARY]
GO

CREATE TABLE [dbo].[bgroupdetail] (
	[Language_ID] [numeric](10, 0) NOT NULL CONSTRAINT BGROUPDETAIL_FK1 FOREIGN KEY REFERENCES [dbo].[language] (id) ON DELETE CASCADE,
	[BGroup_ID] [numeric](10, 0) NOT NULL CONSTRAINT BGROUPDETAIL_FK2 FOREIGN KEY REFERENCES [dbo].[bgroup] (id) ON DELETE CASCADE ,
	[name] [varchar] (32) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL DEFAULT '_NA_',
	[description] [text] COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
	CONSTRAINT BGROUPDETAIL_CST1 UNIQUE NONCLUSTERED (Language_ID, BGroup_ID),
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO

CREATE TABLE [dbo].[contact] (
	[ID] [numeric](10, 0) NOT NULL CONSTRAINT CONTACT_PK PRIMARY KEY,
	[UUID] [varchar] (20) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL DEFAULT '_NA_' CONSTRAINT CONTACT_CS1 UNIQUE
) ON [PRIMARY]
GO

CREATE TABLE [dbo].[contactaddress] (
	[Contact_ID] [numeric](10, 0) NOT NULL CONSTRAINT CONTACTADDRESS_FK1 FOREIGN KEY REFERENCES [dbo].[contact] (id) ON DELETE CASCADE ,
	[Address_ID] [numeric](10, 0) NOT NULL CONSTRAINT CONTACTADDRESS_FK2 FOREIGN KEY REFERENCES [dbo].[address] (id) ON DELETE CASCADE 
) ON [PRIMARY]
GO

CREATE TABLE [dbo].[contactdetail] (
	[Contact_ID] [numeric](10, 0) NOT NULL CONSTRAINT CONTACTDETAIL_FK1 FOREIGN KEY REFERENCES [dbo].[contact] (id) ON DELETE CASCADE ,
	[name] [varchar] (20) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL DEFAULT '_NA_',
	[email] [varchar] (30) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL DEFAULT '_NA_',
	[email2] [varchar] (30) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL DEFAULT '_NA_',
	[phone] [varchar] (20) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL DEFAULT '_NA_',
	[phone2] [varchar] (20) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL DEFAULT '_NA_',
	[fax] [varchar] (20) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL DEFAULT '_NA_'
) ON [PRIMARY]
GO

CREATE TABLE [dbo].[enduser] (
	[ID] [numeric](10, 0) NOT NULL CONSTRAINT ENDUSER_PK PRIMARY KEY,
	[UUID] [varchar] (20) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL DEFAULT '_NA_' CONSTRAINT ENDUSER_CS1 UNIQUE
) ON [PRIMARY]
GO

CREATE TABLE [dbo].[endusercontact] (
	[Contact_ID] [numeric](10, 0) NOT NULL CONSTRAINT ENDUSERCONTACT_FK1 FOREIGN KEY REFERENCES [dbo].[contact] (id) ON DELETE CASCADE,
	[EndUser_ID] [numeric](10, 0) NOT NULL CONSTRAINT ENDUSERCONTACT_FK2 FOREIGN KEY REFERENCES [dbo].[address] (id) ON DELETE CASCADE,
) ON [PRIMARY]
GO

CREATE TABLE [dbo].[enduserdetail] (
	[EndUser_ID] [numeric](10, 0) NOT NULL CONSTRAINT ENDUSERDETAIL_FK1 FOREIGN KEY REFERENCES [dbo].[enduser] (id) ON DELETE CASCADE,
	[login] [varchar] (20) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL DEFAULT '_NA_',
	[passwd] [varchar] (64) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL DEFAULT '_NA_',
	[regDate] [datetime] NOT NULL 
) ON [PRIMARY]
GO

CREATE TABLE [dbo].[image] (
	[ID] [numeric](10, 0) NOT NULL CONSTRAINT IMAGE_PK PRIMARY KEY,
	[link] [varchar] (256) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL DEFAULT '_NA_'
) ON [PRIMARY]
GO

CREATE TABLE [dbo].[sideview] (
	[ID] [numeric](10, 0) NOT NULL CONSTRAINT SIDEVIEW_PK PRIMARY KEY,
	[UUID] [varchar] (20) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL DEFAULT '_NA_' CONSTRAINT SIDEVIEW_CS1 UNIQUE,
	[sideViewType] [char] (8) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL DEFAULT '_NA_'
) ON [PRIMARY]
GO

CREATE TABLE [dbo].[servicetype] (
	[ID] [numeric](10, 0) NOT NULL CONSTRAINT SERVICETYPE_PK PRIMARY KEY,
	[UUID] [varchar] (20) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL DEFAULT '_NA_' CONSTRAINT SERVICETYPE_CS1 UNIQUE,
	[name] [varchar] (32) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL DEFAULT '_NA_',
	[description] [text] COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL 
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO

CREATE TABLE [dbo].[roomtype] (
	[ID] [numeric](10, 0) NOT NULL CONSTRAINT ROOMTYPE_PK PRIMARY KEY,
	[UUID] [varchar] (20) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL DEFAULT '_NA_' CONSTRAINT ROOMTYPE_CS1 UNIQUE,
	[roomType] [char] (8) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL DEFAULT '_NA_'
) ON [PRIMARY]
GO

CREATE TABLE [dbo].[vaservice] (
	[ID] [numeric](10, 0) NOT NULL CONSTRAINT VASERVICE_PK PRIMARY KEY,
	[UUID] [varchar] (20) COLLATE SQL_Latin1_General_CP1_CI_AS NULL DEFAULT '_NA_' CONSTRAINT VASERVICE_CS1 UNIQUE,
	[vaServiceType] [char] (8) COLLATE SQL_Latin1_General_CP1_CI_AS NULL DEFAULT '_NA_'
) ON [PRIMARY]
GO

CREATE TABLE [dbo].[hotel] (
	[ID] [numeric](10, 0) NOT NULL CONSTRAINT HOTEL_PK PRIMARY KEY,
	[UUID] [varchar] (20) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL DEFAULT '_NA_' CONSTRAINT HOTEL_CS1 UNIQUE
) ON [PRIMARY]
GO

CREATE TABLE [dbo].[hoteladdress] (
	[Address_ID] [numeric](10, 0) NOT NULL CONSTRAINT HOTELADDRESS_FK1 FOREIGN KEY REFERENCES [dbo].[address] (id) ON DELETE CASCADE,
	[Hotel_ID] [numeric](10, 0) NOT NULL CONSTRAINT HOTELADDRESS_FK2 FOREIGN KEY REFERENCES [dbo].[hotel] (id) ON DELETE CASCADE
) ON [PRIMARY]
GO

CREATE TABLE [dbo].[hotelcontact] (
	[Hotel_ID] [numeric](10, 0) NOT NULL CONSTRAINT HOTELCONTACT_FK1 FOREIGN KEY REFERENCES [dbo].[hotel] (id) ON DELETE CASCADE,
	[Contact_ID] [numeric](10, 0) NOT NULL CONSTRAINT HOTELCONTACT_FK2 FOREIGN KEY REFERENCES [dbo].[contact] (id) ON DELETE CASCADE
) ON [PRIMARY]
GO

CREATE TABLE [dbo].[hoteldetail] (
	[Language_ID] [numeric](10, 0) NOT NULL CONSTRAINT HOTELDETAIL_FK1 FOREIGN KEY REFERENCES [dbo].[language](id) ON DELETE CASCADE,
	[Hotel_ID] [numeric](10, 0) NOT NULL CONSTRAINT HOTELDETAIL_FK2 FOREIGN KEY REFERENCES [dbo].[hotel] (id) ON DELETE CASCADE,
	[name] [varchar] (20) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL DEFAULT '_NA_',
	[description] [text] COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL DEFAULT '_NA_',
	[alias] [varchar] (128) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL DEFAULT '_NA_',
	CONSTRAINT HOTELDETAIL_CST1 UNIQUE NONCLUSTERED (Language_ID, Hotel_ID)
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO

CREATE TABLE [dbo].[hotelgroup] (
	[Hotel_ID] [numeric](10, 0) NOT NULL CONSTRAINT HOTELGROUP_FK1 FOREIGN KEY REFERENCES [dbo].[hotel](id) ON DELETE CASCADE,
	[BGroup_ID] [numeric](10, 0) NOT NULL CONSTRAINT HOTELGROUP_FK2 FOREIGN KEY REFERENCES [dbo].[bgroup](id) ON DELETE CASCADE,
	CONSTRAINT HOTELGROUP_CST1 UNIQUE NONCLUSTERED (Hotel_ID, BGroup_ID)
) ON [PRIMARY]
GO

CREATE TABLE [dbo].[hotelimage] (
	[Hotel_ID] [numeric](10, 0) NOT NULL CONSTRAINT HOTELIMAGE_FK1 FOREIGN KEY REFERENCES [dbo].[hotel](id) ON DELETE CASCADE,
	[Image_ID] [numeric](10, 0) NOT NULL CONSTRAINT HOTELIMAGE_FK2 FOREIGN KEY REFERENCES [dbo].[image](id) ON DELETE CASCADE,
	CONSTRAINT HOTELIMAGE_CST1 UNIQUE NONCLUSTERED (Hotel_ID, Image_ID)
) ON [PRIMARY]
GO

CREATE TABLE [dbo].[hotelowner] (
	[ServiceType_ID] [numeric](10, 0) NOT NULL CONSTRAINT HOTELOWNER_FK1 FOREIGN KEY REFERENCES [dbo].[servicetype](id) ON DELETE CASCADE,
	[Contact_ID] [numeric](10, 0) NOT NULL CONSTRAINT HOTELOWNER_FK2 FOREIGN KEY REFERENCES [dbo].[contact](id) ON DELETE CASCADE,
	[Hotel_ID] [numeric](10, 0) NOT NULL CONSTRAINT HOTELOWNER_FK3 FOREIGN KEY REFERENCES [dbo].[hotel](id) ON DELETE CASCADE
) ON [PRIMARY]
GO

CREATE TABLE [dbo].[hotelproduct] (
	[ID] [numeric](10, 0) NOT NULL CONSTRAINT HOTELPRODUCT_PK PRIMARY KEY,
	[Hotel_ID] [numeric](10, 0) NOT NULL CONSTRAINT HOTELPRODUCT_FK1 FOREIGN KEY REFERENCES [dbo].[hotel] (id) ON DELETE CASCADE,
	[SideView_ID] [numeric](10, 0) NOT NULL CONSTRAINT HOTELPRODUCT_FK2 FOREIGN KEY REFERENCES [dbo].[sideview] (id) ON DELETE CASCADE,
	[RoomType_ID] [numeric](10, 0) NOT NULL CONSTRAINT HOTELPRDUCT_FK3 FOREIGN KEY REFERENCES [dbo].[roomtype] (id) ON DELETE CASCADE 
) ON [PRIMARY]
GO

CREATE TABLE [dbo].[hotelproductdetail] (
	[HotelProduct_ID] [numeric](10, 0) NOT NULL CONSTRAINT HOTELPRODUCTDETAIL_FK1 FOREIGN KEY REFERENCES [dbo].[hotelproduct] (id) ON DELETE CASCADE,
	[duration] [char] (5) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL ,
	[USD] [numeric](8, 2) NOT NULL ,
	[VND] [numeric](8, 2) NOT NULL ,
	[total] [numeric](10, 0) NOT NULL ,
	[num_avail_rooms] [numeric](10, 0) NULL 
) ON [PRIMARY]
GO

CREATE TABLE [dbo].[hotelservice] (
	[VAService_ID] [numeric](10, 0) NOT NULL CONSTRAINT HOTELSERVICE_FK1 FOREIGN KEY REFERENCES [dbo].[vaservice] (id) ON DELETE CASCADE,
	[Hotel_ID] [numeric](10, 0) NOT NULL CONSTRAINT HOTELSERVICE_FK2 FOREIGN KEY REFERENCES [dbo].[hotel] (id) ON DELETE CASCADE 
) ON [PRIMARY]
GO

CREATE TABLE [dbo].[hotelview] (
	[Hotel_ID] [numeric](10, 0) NOT NULL CONSTRAINT HOTELVIEW_FK1 FOREIGN KEY REFERENCES [dbo].[hotel] (id) ON DELETE CASCADE,
	[SideView_ID] [numeric](10, 0) NOT NULL CONSTRAINT HOTELVIEW_FK2 FOREIGN KEY REFERENCES [dbo].[sideview] (id) ON DELETE CASCADE,
	CONSTRAINT HOTELVIEW_CST1 UNIQUE NONCLUSTERED (Hotel_ID, SideView_ID)
) ON [PRIMARY]
GO

CREATE TABLE [dbo].[imagedata] (
	[Image_ID] [numeric](10, 0) NOT NULL CONSTRAINT IMAGEDATA_FK1 FOREIGN KEY REFERENCES [dbo].[image] (id) ON DELETE CASCADE,
	[binData] [image] NOT NULL 
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO

CREATE TABLE [dbo].[imagedetail] (
	[Language_ID] [numeric](10, 0) NOT NULL CONSTRAINT IMAGEDETAIL_FK1 FOREIGN KEY REFERENCES [dbo].[language] (id) ON DELETE CASCADE,
	[Image_ID] [numeric](10, 0) NOT NULL CONSTRAINT IMAGEDETAIL_FK2 FOREIGN KEY REFERENCES [dbo].[image] (id) ON DELETE CASCADE,
	[description] [text] COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
	CONSTRAINT IMAGEDETAIL_CST1 UNIQUE NONCLUSTERED (Language_ID, Image_ID)
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO

CREATE TABLE [dbo].[metatype] (
	[ID] [numeric](10, 0) NOT NULL CONSTRAINT METATYPE_PK PRIMARY KEY,
	[name] [char] (20) COLLATE SQL_Latin1_General_CP1_CI_AS NULL DEFAULT '_NA_'
) ON [PRIMARY]
GO

CREATE TABLE [dbo].[orderstatus] (
	[ID] [numeric](10, 0) NOT NULL CONSTRAINT ORDERSTATUS_PK PRIMARY KEY,
	[statusName] [char] (10) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL DEFAULT '_NA_'
) ON [PRIMARY]
GO

CREATE TABLE [dbo].[roomorder] (
	[ID] [numeric](10, 0) NOT NULL CONSTRAINT ROOMORDER_PK PRIMARY KEY,
	[EndUser_ID] [numeric](10, 0) NOT NULL CONSTRAINT ROOMORDER_FK1 FOREIGN KEY REFERENCES [dbo].[enduser] (id) ON DELETE CASCADE,
	[UUID] [varchar] (20) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL DEFAULT '_NA_' CONSTRAINT ROOMORDER_CS1 UNIQUE,
	[orderDate] [datetime] NULL 
) ON [PRIMARY]
GO

CREATE TABLE [dbo].[orderitem] (
	[OrderStatus_ID] [numeric](10, 0) NOT NULL CONSTRAINT ORDERITEM_FK1 FOREIGN KEY REFERENCES [dbo].[orderstatus] (id) ON DELETE CASCADE,
	[RoomOrder_ID] [numeric](10, 0) NOT NULL CONSTRAINT ORDERITEM_FK2 FOREIGN KEY REFERENCES [dbo].[roomorder] (id) ON DELETE CASCADE,
	[HotelProduct_ID] [numeric](10, 0) NOT NULL CONSTRAINT ORDERITEM_FK3 FOREIGN KEY REFERENCES [dbo].[hotelproduct] (id) ON DELETE CASCADE,
	[fromDate] [datetime] NOT NULL ,
	[toDate] [datetime] NOT NULL ,
	[quantity] [numeric](10, 0) NOT NULL 
) ON [PRIMARY]
GO

CREATE TABLE [dbo].[register] (
	[ID] [numeric](10, 0) NOT NULL CONSTRAINT REGISTER_PK PRIMARY KEY ,
	[UUID] [varchar] (20) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL DEFAULT '_NA_' CONSTRAINT REGISTER_CS1 UNIQUE
) ON [PRIMARY]
GO

CREATE TABLE [dbo].[processregister] (
	[Register_ID] [numeric](10, 0) NOT NULL CONSTRAINT PROCESSREGISTER_FK1 FOREIGN KEY REFERENCES [dbo].[register] (id) ON DELETE CASCADE,
	[logDate] [datetime] NOT NULL ,
	[comments] [text] COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL 
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO

CREATE TABLE [dbo].[registerdetail] (
	[Contact_ID] [numeric](10, 0) NOT NULL CONSTRAINT REGISTERDETAIL_FK1 FOREIGN KEY REFERENCES [dbo].[contact] (id) ON DELETE CASCADE,
	[ServiceType_ID] [numeric](10, 0) NOT NULL CONSTRAINT REGISTERDETAIL_FK2 FOREIGN KEY REFERENCES [dbo].[servicetype] (id) ON DELETE CASCADE,
	[Register_ID] [numeric](10, 0) NOT NULL CONSTRAINT REGISTERDETAIL_FK3 FOREIGN KEY REFERENCES [dbo].[register] (id) ON DELETE CASCADE
) ON [PRIMARY]
GO

CREATE TABLE [dbo].[roomtypedetail] (
	[RoomType_ID] [numeric](10, 0) NOT NULL CONSTRAINT ROOMTYPEDETAIL_FK1 FOREIGN KEY REFERENCES [dbo].[roomtype] (id) ON DELETE CASCADE,
	[Language_ID] [numeric](10, 0) NOT NULL CONSTRAINT ROOMTYPEDETAIL_FK2 FOREIGN KEY REFERENCES [dbo].[language] (id) ON DELETE CASCADE,
	[name] [varchar] (32) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL DEFAULT '_NA_',
	[description] [text] COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
	CONSTRAINT ROOMTYPEDETAIL_CST1 UNIQUE NONCLUSTERED (RoomType_ID,Language_ID)
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO

CREATE TABLE [dbo].[searchmeta] (
	[MetaType_ID] [numeric](10, 0) NOT NULL CONSTRAINT SEARCHMETA_FK1 FOREIGN KEY REFERENCES [dbo].[metatype] (id) ON DELETE CASCADE,
	[metaString] [varchar] (32) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL DEFAULT '_NA_',
	[ref_ID] [numeric](10, 0) NOT NULL 
) ON [PRIMARY]
GO

CREATE TABLE [dbo].[sideviewdetail] (
	[SideView_ID] [numeric](10, 0) NOT NULL CONSTRAINT SIDEVIEWDETAIL_FK1 FOREIGN KEY REFERENCES [dbo].[sideview] (id) ON DELETE CASCADE,
	[Language_ID] [numeric](10, 0) NOT NULL CONSTRAINT SIDEVIEWDETAIL_FK2 FOREIGN KEY REFERENCES [dbo].[language] (id) ON DELETE CASCADE,
	[name] [varchar] (32) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL DEFAULT '_NA_',
	[description] [text] COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
	CONSTRAINT SIDEVIEWDETAIL_CST1 UNIQUE NONCLUSTERED (SideView_ID,Language_ID)
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO

CREATE TABLE [dbo].[sideviewimage] (
	[Image_ID] [numeric](10, 0) NOT NULL CONSTRAINT SIDEVIEWIMAGE_FK1 FOREIGN KEY REFERENCES [dbo].[image] (id) ON DELETE CASCADE,
	[SideView_ID] [numeric](10, 0) NOT NULL CONSTRAINT SIDEVIEWIMAGE_FK2 FOREIGN KEY REFERENCES [dbo].[sideview] (id) ON DELETE CASCADE,
	CONSTRAINT SIDEVIEWIMAGE_CST1 UNIQUE NONCLUSTERED (Image_ID, SideView_ID)
) ON [PRIMARY]
GO

CREATE TABLE [dbo].[systemcounter] (
	[cname] [char] (20) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL ,
	[cvalue] [numeric](10, 0) NOT NULL 
) ON [PRIMARY]
GO

CREATE TABLE [dbo].[vaservicedetail] (
	[VAService_ID] [numeric](10, 0) NOT NULL CONSTRAINT VASERVICEDETAIL_FK1 FOREIGN KEY REFERENCES [dbo].[vaservice] (id) ON DELETE CASCADE,
	[Language_ID] [numeric](10, 0) NOT NULL CONSTRAINT VASERVICEDETAIL_FK2 FOREIGN KEY REFERENCES [dbo].[language] (id) ON DELETE CASCADE,
	[description] [text] COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
	CONSTRAINT VASERVICEDETAIL_CST1 UNIQUE NONCLUSTERED (VAService_ID,Language_ID)
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO

